package com.ruoyi.business.service.impl;

import com.ruoyi.business.entity.ChatContent;
import com.ruoyi.business.entity.dto.Friends;
import com.ruoyi.business.entity.dto.SellerFriends;
import com.ruoyi.business.mapper.FrontChatContentMapper;
import com.ruoyi.business.service.FrontChatContentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Ao
 * @since 2024-01-17
 */
@Service
public class FrontChatContentServiceImpl extends ServiceImpl<FrontChatContentMapper, ChatContent> implements FrontChatContentService {

    @Autowired
    private FrontChatContentMapper frontChatContentMapper;

    @Override
    public List<Friends> getFriends(String userid) {
        return frontChatContentMapper.getFriends(userid);

    }

    @Override
    public List<ChatContent> getContent(String myuserid, String friendid, Long homestayId) {

        return frontChatContentMapper.getContent(myuserid,friendid,homestayId);
    }

    @Override
    public  Integer updateReadStatus(String myuserid, String friendid, Long homestayId){
        return frontChatContentMapper.updateReadStatus(myuserid,friendid,homestayId);
    }

    @Override
    public List<SellerFriends> getSellerFriends(String myuserid,Integer myType){
        return frontChatContentMapper.getSellerFriends(myuserid,myType);
    }


}
